﻿#pragma once

#include <qwidget.h>
#include <qmainwindow.h>
#include <QApplication>
#include <qpushbutton.h>
#include <qtablewidget.h>
#include <qtableview.h>
#include <QHeaderView>
#include <QComboBox>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QVector>
#include <QFile>
#include <QTextStream>
#include <QBarSet>
#include <QBarSeries>
#include <QCategoryAxis>
#include <QDebug>
#include <numeric>
#include <cmath>
#include "DataForSim/modelsim.h"


class TableDataAnalysis : public  QMainWindow
{
    Q_OBJECT

public:
    TableDataAnalysis(QWidget *parent = nullptr);
    ~TableDataAnalysis();

private slots:
    void onOpenFile();
    void onOpenFordSim();
    void onHistogram();
    void onBoxPlot();
    void onSpreadSheet();
    void onScatter();
    void onMultiCurves();
    
private:
    void setupUI();
    void loadAndAnalyzeData(const QString& filePath);
    
    
    

private:
    QPushButton* btnOpenParamTest, *btnOpenFordSim, *btnHistogram, 
        *btnSpreadSheet, *btnPlotScattor, *btnMultiCurves;
    //QPushButton* btnBoxPlot;
    
    QVector<QVector<double>> columnData;
    QStringList columnNames;
    std::shared_ptr<ModelSim> modelSim=nullptr;
};
